<!--
 * @Author: cly
 * @Date: 2021-07-12 16:49:17
 * @LastEditTime: 2021-07-13 10:40:18
 * @LastEditors: cly
 * @Description: Never give up
 * @FilePath: \briup_cly\day02\xxtx-ui\fengcai.html
 * @sxnd1006
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>游学风采详情页</title>
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/fengcai.css">
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.js"> </script>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/moment.js"></script>
</head>
<body>
    <div id="fenCai">
        <div class="header">
            <div class="headLeft">
                <div class="login" @click="toIndex()" title="返回首页">
                游学天下
                </div>
                <div class="title" @click="toIndex()" title="返回首页">
                行学天下
                </div>    
            </div>
            <div class="headRight">
                <div class="callMe">
                    <a href="#callMe">
                    <img src="image/callMe.jpg" alt="图片丢失了">
                       致电我们  
                    </a>                           
                </div>       
            </div>  
        </div> 
        <div class="main">
            <div class="title">
                 {{articleFenCai.title}}
            </div>
            <div class="time">
                {{formatDate(articleFenCai.publishTime)}}~{{
                    formatDate(articleFenCai.readTimes)}} | {{articleFenCai.status}}
            </div>
            <div class="fenCai" v-html="articleFenCai.content">
                
            </div>
            <div class="fenCai" v-if="articleFenCai.baseUser">
                 
            </div>
            <div class="like">
                

            </div>
            <div class="title">
                {{articleFenCai.category.name}}    
            </div>
            <div class="fenCai">
                {{articleFenCai.category.description}} 
                {{articleFenCai.category.no}}   
                {{articleFenCai.category.parentId}}  
            </div>
            <div class="title">
                联系老师信息
            </div>
           <div class="fenCai" v-if="articleFenCai.baseUser">
               {{articleFenCai.baseUser.realname}}
               {{articleFenCai.baseUser.telephone}}
           </div>
           
            <div class="toIndex">
                <div class="myBtn" @click="toIndex()">
                    点击此处返回首页
                </div>
            </div>
        </div>
          
        <!--页面底部消息-->
        <div class="footer">
            <div class="callMe" id="callMe">
                联系我们 （工作时间:9:00-17:00)
                400-860-0987
                <a href="https://briup.cn">sxnd@rjxu.net</a>
                <a target="_black" href="https://briup.cn">在线客服</a>
            </div>
            <div class="beiAn">
                <a href="http://beian.miit.gov.cn">京x备xxxxxxxxxx号</a>
                <a href="http://www.beian.gov.cn/portal/registerSystemInfo">公安备案号0000000</a>
            </div>
            <div class="callMe">
                @山西农业大学软件学院
            </div>
        </div>
    </div>
</body>
<script>
    new Vue({
        el:'#fenCai',
        data:{
           articleFenCai:[],
        },
        created(){
          var id=window.location.search.split('=')[1];
          //console.log(id);
          axios.get('http://47.94.46.113:8888/index/article/findById?id='+id).then((res) => {
          this.articleFenCai=res.data.data
        })
        },
        methods:{
             // 将时间戳格式化
            formatDate(date) {
            return moment(date).format('YYYY-MM-DD')
            },
            //返回首页
            toIndex(){
              window.location.href='index.html'
            }
        }
    })
</script>
</html>